
#绝对路径
file_path = "D:\\1.project\py\\05_特殊参数，文件IO\\11_文件操作模式 .py"
file_path = "D:/1.project\py/05_特殊参数，文件IO/11_文件操作模式 .py"
with open(file_path,encoding="utf-8") as f:
    print(f.read())
    
#相对路径
with open("../实战项目01-贪吃蛇/main.py",encoding="utf-8") as f:
    print(f.read())  